#pragma once
#ifndef SignatureGenerator_h__
#define SignatureGenerator_h__

#include <QString>
#include <QMessageAuthenticationCode>
#include <QCryptographicHash>
#include <QMap>

namespace AliOSS
{
    class SignatureGenerator
    {
    public:
        SignatureGenerator(
            const QString &bucket,
            const QString &accessId,
            const QByteArray &accessSecert);
        ~SignatureGenerator();
    public:
		QString once(
			const QString &verb,
			const QString &datetimestr,
			const QString &filePath,
			const QString &md5InBase64=QString(), const QMap<QString, QByteArray> ossHeaders=QMap<QString,QByteArray>(),
			const QString &contentType=QString());
    private:
        QString bucket;
        QString accessId;
        QByteArray accessSecert;
    };
}
#endif // SignatureGenerator_h__